<?php if(!defined('HDWIKI_ROOT')) exit('Access Denied');?>
<?php include $this->gettpl('admin_header');?>
<script type="text/javascript">
function doSubmit(){
	if(isNaN($('#time_diff').val())==true){
		alert('“本地时间与服务器的时间差”必须为数字!');
		$('#time_diff').focus();
		return false;
	}
	
	if(confirm('警告：提交后将覆盖系统当前参数设置，是否继续?')==false){
		return false;
	}
}
</script>
<p class="map">全局：基本设置</p>
<p class="sec_nav">基本设置：<a href="index.php?admin_channel"> <span>频道管理</span></a> <a href="index.php?admin_setting-cache"> <span>缓存设置</span></a> <a href="index.php?admin_setting-seo"><span>SEO设置</span></a> <a href="index.php?admin_setting-code"><span>验证码</span></a> <a href="index.php?admin_setting-time" class="on"><span>时间设置</span></a> <a href="index.php?admin_setting-cookie" ><span>COOKIE设置</span></a> <a href="index.php?admin_setting-credit" ><span>经验金币设置</span></a> <a href="index.php?admin_setting-logo" ><span>LOGO设置</span></a></p>
<h3 class="col-h3">时间设置</h3>
<form method="POST" action="index.php?admin_setting-time" onsubmit="return doSubmit();">
	<table class="table">
		<tr>
			<td width="300px;"><span>默认时区设置</span>服务器的时区设置</td>
			<td>
				<select class="box" name="setting[time_offset]" >
				<?php foreach((array)$timeoffset as $key=>$value) {?>
					<option value="<?php echo $key?>" <?php if($key==$basecfginfo['time_offset']) { ?> selected <?php } ?> ><?php echo $value?></option>
				<?php }?>
				</select>
			</td>
		</tr>
		<tr>
			<td><span>本地时间与服务器的时间差(分钟)</span>时间差(分钟)，例如本地 8:00 服务器 8:10，则填写-10</td>
			<td><input class="inp_txt" name="setting[time_diff]" id="time_diff"  type="text" value="<?php echo $basecfginfo['time_diff']?>" /></td>
		</tr>
		<tr>
			<td><span>网站显示日期格式</span>选择合适的日期格式显示</td>
			<td>
				<select name="setting[date_format]" class="box" style="width:200px;" >
					<option value=""  <?php if($basecfginfo['date_format']=="") { ?> selected <?php } ?>  ><?php  echo date("Y-n-j");?>  Y-n-j</option>
					<option value="Y/m/d" <?php if($basecfginfo['date_format']=="Y/m/d") { ?>selected<?php } ?>  ><?php  echo date("Y/m/d");?> (Y/M/D)</option>
					<option value="m/d/Y" <?php if($basecfginfo['date_format']=="m/d/Y") { ?>selected<?php } ?>  ><?php  echo date("m/d/Y");?> (M/D/Y)</option>
					<option value="d/m/Y" <?php if($basecfginfo['date_format']=="d/m/Y") { ?>selected<?php } ?>><?php  echo date("d/m/Y");?> (D/M/Y)</option>
					<option value="m/d" <?php if($basecfginfo['date_format']=="m/d") { ?>selected<?php } ?>><?php  echo date("m/d");?> (M/D)</option>
					<option value="d/m" <?php if($basecfginfo['date_format']=="d/m") { ?>selected<?php } ?>><?php  echo date("d/m");?> (D/M)</option>
					<option value="Y.m.d" <?php if($basecfginfo['date_format']=="Y.m.d") { ?>selected<?php } ?>><?php  echo date("Y.m.d");?> (Y.M.D)</option>
					<option value="m.d.Y" <?php if($basecfginfo['date_format']=="m.d.Y") { ?>selected<?php } ?>><?php  echo date("m.d.Y");?> (M.D.Y)</option>
					<option value="d.m.Y" <?php if($basecfginfo['date_format']=="d.m.Y") { ?>selected<?php } ?>><?php  echo date("d.m.Y");?> (D.M.Y)</option>
					<option value="m.d" <?php if($basecfginfo['date_format']=="m.d") { ?>selected<?php } ?>><?php  echo date("m.d");?> (M.D)</option>
					<option value="d.m" <?php if($basecfginfo['date_format']=="d.m") { ?>selected<?php } ?>><?php  echo date("d.m");?> (D.M)</option>
					<option value="Y-m-d" <?php if($basecfginfo['date_format']=="Y-m-d") { ?>selected<?php } ?>><?php  echo date("Y-m-d");?> (Y-M-D)</option>
					<option value="m-d-Y" <?php if($basecfginfo['date_format']=="m-d-Y") { ?>selected<?php } ?>><?php  echo date("m-d-Y");?> (M-D-Y)</option>
					<option value="d-m-Y" <?php if($basecfginfo['date_format']=="d-m-Y") { ?>selected<?php } ?>><?php  echo date("d-m-Y");?> (D-M-Y)</option>
					<option value="m-d" <?php if($basecfginfo['date_format']=="m-d") { ?>selected<?php } ?>><?php  echo date("m-d");?>(M-D)</option>
					<option value="d-m" <?php if($basecfginfo['date_format']=="d-m") { ?>selected<?php } ?>><?php  echo date("d-m");?> (D-M)</option>
					<option value="M d Y" <?php if($basecfginfo['date_format']=="M d Y") { ?>selected<?php } ?>><?php  echo date("M d Y");?></option>
					<option value="d M Y" <?php if($basecfginfo['date_format']=="d M Y") { ?>selected<?php } ?>><?php  echo date("d M Y");?></option>
					<option value="M d" <?php if($basecfginfo['date_format']=="M d") { ?>selected<?php } ?>><?php  echo date("M d");?></option>
					<option value="d M" <?php if($basecfginfo['date_format']=="d M") { ?>selected<?php } ?>><?php  echo date("d M");?></option>
					<option value="jS F, Y" <?php if($basecfginfo['date_format']=="jS F, Y") { ?>selected<?php } ?>><?php  echo date("jS F, Y");?></option>
					<option value="l, jS F, Y" <?php if($basecfginfo['date_format']=="l, jS F, Y") { ?>selected<?php } ?>><?php  echo date("l, jS F, Y");?></option>
					<option value="jS F" <?php if($basecfginfo['date_format']=="jS F") { ?>selected<?php } ?>><?php  echo date("jS F");?></option>
					<option value="l, jS F" <?php if($basecfginfo['date_format']=="l, jS F") { ?>selected<?php } ?>><?php  echo date("l, jS F");?></option>
				</select>
			</td>
		</tr>
		<tr>
			<td><span>网站显示时间格式</span>选择时间的日期格式显示</td>
			<td>
				<select name="setting[time_format]" class="box" style="width:200px;" >
					<option value="" <?php if($basecfginfo['time_format']=="") { ?>selected<?php } ?>><?php  echo date("H:i");?>  H:i</option>
					<option value="H:i" <?php if($basecfginfo['time_format']=="H:i") { ?>selected<?php } ?>><?php echo date("H:i");?></option>
					<option value="H:i:s" <?php if($basecfginfo['time_format']=="H:i:s") { ?>selected<?php } ?>><?php echo date("H:i:s");?></option>
					<option value="g:i a" <?php if($basecfginfo['time_format']=="g:i a") { ?>selected<?php } ?>><?php echo date("g:i a");?></option>
					<option value="g:i A" <?php if($basecfginfo['time_format']=="g:i A") { ?>selected<?php } ?>><?php echo date("g:i A");?></option>
				</select>
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<input class="inp_btn" name="timesubmit" type="submit" value="保 存" />&nbsp;&nbsp;
				<input class="inp_btn" type="reset" value="重置" />
			</td>
		</tr>
	</table>
</form>
<?php include $this->gettpl('admin_footer');?>